package com.woniu.apidriver.controller;

import com.woniu.apidriver.service.PayService;
import com.woniu.internalcommon.dto.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api-pay")
public class PayControllerr {

    @Autowired
    private PayService payService;


    /**
     * 司机发起收款
     * @param orderId
     * @param price
     * @return
     */
    @GetMapping("/pushPayInfo")
    public ResponseResult pushPayInfo(@RequestParam("orderId") Long orderId ,
                              @RequestParam("price") String price,
                              @RequestParam("passengerId") Long passengerId) {

        return payService.pushPayInfo(orderId,price,passengerId);
    }
}
